/*
 * @Author: zhang ke
 * @Date: 2025-06-20 15:36:46
 * @LastEditors: your name
 * @LastEditTime: 2025-07-03 17:20:30
 * @Description: 
 * @FilePath: \vue3-admin\src\main.ts
 */
import { createApp } from 'vue'
import App from '@/App.vue'
import ElementPlus from 'element-plus'
import 'element-plus/dist/index.css'
//element 中文
import zhCn from 'element-plus/es/locale/lang/zh-cn'
//暗黑模式
import 'element-plus/theme-chalk/dark/css-vars.css'
import router from './router'
//引入scss
import './styles/index.scss'
//svg插件需要配置代码
import 'virtual:svg-icons-register'
import pinia from './store'
//引入自定义插件对象：注册整个项目全局组件
import gloabComponent from '@/components/index'
//引入路由鉴权逻辑
import './permission'

//引入自定义指令文件
import { isHasButton } from './directive/has'
const app = createApp(App)
app.use(ElementPlus, {
  locale: zhCn,
})
isHasButton(app)
app.use(router)
app.use(pinia)
app.use(gloabComponent)
app.mount('#app')
